<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h2 style="color:red;font-size:30px;">哈哈哈</h2>
    <h2 v-bind:style="{color:fontColor,fontSize:fontSize+'px'}">呵呵呵</h2>
    <h2 :style="objStyle">嘻嘻嘻</h2>
    <h3 :style="[objStyle,{backgroundColor:'purple'}]"></h3>
</div>
<script src="https://unpkg.com/vue@3"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                fontColor:'blue',
                fontSize:33,
                objStyle:{
                    fontSize:'50px',
                    color:'green'
                }
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>